

from tkinter import *



root = Tk()

isSelect = IntVar()

GIRLS=["志玲","柳岩","佟丽娅","范冰冰"]

v=[]

# checkbox
for i in GIRLS:
    
    v.append(IntVar())

    c = Checkbutton(root,
        text=i,
        variable=v[-1],
        justify=LEFT)

    c.pack(anchor="w")    

# c = Checkbutton(root,

#     text="woqu ",
#     variable=isSelect)

# c.pack()

# txt = Label(root,
#     text="isSelect:"+str(isSelect)
#     )

# txt.pack()    


# radio

# radio_txt = Label(root,
#     textvariable=radi)

RADIO_VALUE=[
    ('apple',1),
    ('watermalon',2),
    ('tomato',3)
]



# frame + checkbox + radio
group = LabelFrame(root,text="Do you love me?",
        padx=10,
        pady=10)

group.pack(padx=10,pady=10)

radio_int = IntVar()

for j,num in RADIO_VALUE:

    Radiobutton(group,
        text=j,
        variable=radio_int,
        value=num,
        indicatoron=False).pack(anchor="w",padx=10,pady=10)








mainloop()



























